<?php

//require("../dbinfo.php");

$id = $_GET["id"];

$con = mysql_connect('localhost', 'root', 'root');
if(!$con){
	die('Could not connect: ' . mysql_error());
}

mysql_select_db("exemplo", $con);

$sql = "SELECT * FROM objeto WHERE id = " . $id;
$result = mysql_query($sql);
echo "<table border='1'>
		<tr>
			<th>ID</th>
			<th>TIPO</th>
			<th>LATITUDE</th>
			<th>LONGITUDE</th>
		</tr>";

while($row = mysql_fetch_array($result)){
	echo "<tr>";
	echo "<td>" . $row['id'] . "</td>";
	echo "<td>" . $row['tipo'] . "</td>";
	echo "<td>" . $row['latitude'] . "</td>";
	echo "<td>" . $row['longitude'] . "</td>";
	echo "</tr>";	
}

echo "</table>";
mysql_close($con);

?>